<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
response.setHeader("Pragma","No-cache"); 
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0);
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div class="tableBox" style="background:#556272;">
	<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
		<tr>
		    <th>用户ID</th>
		    <th>用户名</th>
		    <th>所属公司</th>
		    <th>所属角色</th>
		    <th>用户状态</th>
		    <th>上次登录时间</th>
		    <th>Email</th>
		    <th>用户是否接受邮件通知</th>
		    <th>&nbsp;</th>
		</tr>
		<c:if test="${list!=null }">
		<c:forEach var="user" items="${list}" varStatus="index">
		<tr>
		    <td><c:out value="${user['USER_ID']}"></c:out>&nbsp;</td>
		    <td><c:out value="${user['USER_NAME']}"></c:out>&nbsp;</td>
		    <td><c:out value="${user['COMPANY']}"></c:out>&nbsp;</td>
		    <td><c:if test="${not empty user['ROLE_NAME']}">
		    <c:out value="${user['ROLE_NAME']}"></c:out></c:if>&nbsp;</td>
		    <td>
			    <c:if test="${user['USER_DISABLED']=='1'}">正常</c:if>
			    <c:if test="${user['USER_DISABLED']=='3'}">注销</c:if>
			    <c:if test="${user['USER_DISABLED']=='5'}">锁定</c:if>&nbsp;
		    </td>
		    <td><c:out value="${user['LAST_LOGIN_TIME']}"></c:out>&nbsp;</td>
		    <td><c:out value="${user['EMAIL_ADDRESS']}"></c:out>&nbsp;</td>
		    <td><c:out value="${user['EMAIL_NOTIFICATIONS']=='1'?'是':'否'}"></c:out>&nbsp;</td>                     
		    <td>	                                            
			    <a href="<%=path %>/servlet/UpdateServlet?key=toUpUser&userId=${user['USER_ID']}" ><img src="<%=path%>/images/icon/list_edit.gif" />修改</a>|
			    <a href="<%=path %>/servlet/DelServlet?key=doDelUser&userID=${user['USER_ID']}" onclick="return confirm('确定删除?');"><img src="<%=path%>/images/icon/list_del.gif" />删除</a>|
			    <a href="<%=path %>/servlet/UpdateServlet?key=toUpPwd&userID=${user['USER_ID']}" ><img src="<%=path%>/images/icon/list_edit.gif" />修改密码</a>
	    	</td>
	  </tr>
	  </c:forEach>
	  </c:if>
	</table>
</div>